<?php
$this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Login");
$this->breadcrumbs=array(
	UserModule::t("Login"),
);
?>

<div class="login-content">
	 <div class="box paint color_2">
		<div class="title">
		  <h4> <i class="icon-calendar"></i> <span><?php echo UserModule::t("Login"); ?></span> </h4>
		</div>
		<?php if(Yii::app()->user->hasFlash('loginMessage')): ?>
		<div class="success">
			<?php echo Yii::app()->user->getFlash('loginMessage'); ?>
		</div>
		<?php endif; ?>
		<div class="content ">
			<?php echo CHtml::beginForm('/user/login', 'post', array('class'=> 'bs-docs-example form-horizontal')); ?>	<!--form class="bs-docs-example form-horizontal"-->
				<?php echo CHtml::errorSummary($model); ?>
				 <div class="control-group row-fluid">
					<?php echo CHtml::activeLabelEx($model,'userName', array('class'=>"control-label span3", "for"=>"inputPassword")); ?>
					<div class="controls span9 input-append">
						<?php echo CHtml::activeTextField($model,'userName', array("type"=>"password", "id"=>"inputuserName", "placeholder"=>"userName", "class"=>"row-fluid")) ?>
						<span class="add-on"><i class="icon-user"></i></span> 
					</div>
				 </div>
				 <div class="control-group row-fluid">
					<?php echo CHtml::activeLabelEx($model,'password', array("class"=>"control-label span3", "for"=>"inputPassword")); ?>
					<div class="controls span9 input-append">
						<?php echo CHtml::activePasswordField($model,'password', array("type"=>"password", "id"=>"inputPassword", "placeholder"=>"Password", "class"=>"row-fluid")) ?>
						<span class="add-on"><i class="icon-lock"></i></span> </div>
				 </div>
				
				 <div class="control-group row-fluid">
				  <div class="span3 visible-desktop"></div>
					<div class="controls span5">
					  <?php echo CHtml::submitButton("Login", array('class'=> 'btn btn-primary')); ?>
					</div>
				 </div>
			<?php echo CHtml::endForm(); ?>
		</div>
	 </div>
</div>

<?php
	$form = new CForm(array(
		'elements'=>array(
				'userName'=>array(
						'type'=>'text',
						'maxlength'=>32,
				),
				'password'=>array(
						'type'=>'password',
						'maxlength'=>32,
				),
				'rememberMe'=>array(
						'type'=>'checkbox',
				)
		),

		'buttons'=>array(
				'login'=>array(
						'type'=>'submit',
						'label'=>'Login',
				),
		),
	), $model);
?>